package com.zbs.framework.core.phonevcode.action;

import com.zbs.framework.common.utils.ResultData;
import com.zbs.framework.common.utils.ResultUtil;
import com.zbs.framework.dao.phonevcode.service.PhoneVCodeService;
import com.zbs.framework.swagger.annotations.ApiOperation;
import com.zbs.framework.swagger.annotations.ApiParam;
import com.zbs.framework.swagger.annotations.ApiTags;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 短信验证码控制器
 *
 * @author Zbs
 */
@ApiTags(value = "短信验证码管理", group = "UIM")
@RestController
@RequestMapping("/phoneVCode")
public class PhoneVCodeController {

    @Autowired
    private PhoneVCodeService phoneVCodeService;

    /**
     * 获取短信验证码
     *
     * @param phone
     * @param vType
     * @return
     */
    @ApiOperation("获取短信验证码")
    @PostMapping("/getPhoneVCode.do")
    public ResultData<?> getPhoneVCode(@ApiParam("手机号") String phone,@ApiParam("验证码类型") String vType) {
        phoneVCodeService.getPhoneVCode(phone, vType);
        return ResultUtil.ok();
    }

}
